<include file="Common:header" />
<div class="layui-card layadmin-header"> <span class="layui-breadcrumb" lay-separator="/"> <a href="{:U('Index/welcome')}">首页</a><a href="{:U('Category/index')}">分类管理</a> </span> </div>
<div class="layui-fluid pt-10 pr-10 pl-20">
	<div class="layui-btn-group demoTable">
		<button class="layui-btn" data-type="addData">添加类别</button>
		<button class="layui-btn" data-type="deleteData">删除选中行数据</button>
	</div>
	<table class="layui-table mt-5" id="dataList" lay-filter="dataFilter"></table>
</div>

<script type="text/html" id="bar">
	<div class="layui-btn-group">
		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="add"><i class="layui-icon layui-icon-add-1"></i>添加子类</a>
		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="up"><i class="layui-icon layui-icon-up"></i>向上</a>
		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="down"><i class="layui-icon layui-icon-down">向下</i></a>
	</div>
</script>

<script type="text/html" id="createdTpl">
{{#  
	var fn = function(s){
		var time = new Date(parseInt(s)*1000);
		var y = time.getFullYear();
		var m = time.getMonth()+1;
		var d = time.getDate();
		var h = time.getHours();
		var mm = time.getMinutes();
		var s = time.getSeconds();
		return y + '-' + (m<10?'0'+m : m)+'-' +(d<10?'0'+d : d);
	}; 
}}
{{ fn(d.created) }}
</script>

<script>
layui.use(['category'], function(){
	var category = layui.category;
	category.init();
});
</script>
<include file="Common:footer" />